﻿<UserControl x:Class="CosmopolitanWpf.Views.Sdk"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
             xmlns:SampleData="clr-namespace:CosmopolitanWpf.SampleData.SampleDataSource"
             mc:Ignorable="d">

    <UserControl.Resources>
        <SolidColorBrush x:Key="GrayBrush3"
                         Color="{StaticResource Gray3}" />
        <SampleData:SampleDataSource x:Key="SampleDataSource" />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot"
          Margin="0,15,0,0"
          DataContext="{Binding Source={StaticResource SampleDataSource}}">
        <ScrollViewer x:Name="PageScrollViewer"
                      Style="{StaticResource PageScrollViewerStyle}">

            <StackPanel x:Name="ContentStackPanel">

                <Grid Margin="0,10,0,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.5*" />
                        <ColumnDefinition Width="0.25*" />
                        <ColumnDefinition Width="0.25*" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Column="0">
                        <TextBlock Style="{StaticResource ControlLabelStyle}"
                                   TextWrapping="Wrap"
                                   Text="DATAGRID"
                                   Margin="0,0,48.5,0"
                                   Height="16"
                                   VerticalAlignment="Top" />
                        <DataGrid AutoGenerateColumns="False"
                                  ItemsSource="{Binding Collection}"
                                  Margin="0,30,0,0"
                                  Grid.ColumnSpan="1"
                                  HorizontalAlignment="Left"
                                  VerticalAlignment="Top"
                                  HeadersVisibility="All">
                            <DataGrid.Columns>
                                <DataGridTextColumn Binding="{Binding Property1}"
                                                    Header="Property1" />
                                <DataGridTextColumn Binding="{Binding Property2}"
                                                    Header="Property2" />
                                <DataGridTextColumn Binding="{Binding Property3}"
                                                    Header="Property3" />
                            </DataGrid.Columns>
                        </DataGrid>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <StackPanel Grid.Column="0">
                                <TreeView Margin="0,51,20,3">
                                    <TreeViewItem Header="TreeViewItem"
                                                  IsExpanded="True"
                                                  Margin="0">
                                        <TreeViewItem Header="TreeViewItem"
                                                      IsExpanded="True"
                                                      Margin="0">
                                            <TreeViewItem Header="TreeViewItem"
                                                          Margin="0" />
                                        </TreeViewItem>
                                    </TreeViewItem>
                                </TreeView>
                            </StackPanel>
                            <TextBlock Style="{StaticResource ControlLabelStyle}"
                                       TextWrapping="Wrap"
                                       Text="TREEVIEW"
                                       Margin="0,40,0,11"
                                       VerticalAlignment="Top" />
                        </Grid>
                    </StackPanel>
                    <StackPanel Width="250"
                                Grid.Column="1"
                                Margin="40,-6,5,0">
                        <TextBlock Style="{StaticResource ControlLabelStyle}"
                                   TextWrapping="Wrap"
                                   Text="GRIDSPLITTER"
                                   Margin="0,10" />
                        <Grid Margin="0"
                              VerticalAlignment="Stretch"
                              HorizontalAlignment="Stretch"
                              Background="#FFE6E6E6"
                              Height="50">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.511*" />
                                <ColumnDefinition Width="0.489*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.5*" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="0.5*" />
                            </Grid.RowDefinitions>
                            <GridSplitter Grid.Column="0"
                                          Grid.ColumnSpan="2"
                                          Grid.Row="1"
                                          Width="Auto"
                                          Height="10"
                                          HorizontalAlignment="Stretch"
                                          VerticalAlignment="Stretch"
                                          d:LayoutOverrides="VerticalMargin" ResizeDirection="Rows" />
                        </Grid>
                        <Grid Margin="0,10,0,0"
                              VerticalAlignment="Stretch"
                              HorizontalAlignment="Stretch"
                              Background="#FFE6E6E6"
                              d:LayoutOverrides="VerticalAlignment, Width"
                              Height="50">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.5*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="0.5*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.5*" />
                                <RowDefinition Height="0.5*" />
                            </Grid.RowDefinitions>
                            <GridSplitter Grid.Column="1"
                                          Grid.RowSpan="2"
                                          Grid.Row="0"
                                          Width="10"
                                          Height="Auto"
                                          HorizontalAlignment="Stretch"
                                          VerticalAlignment="Stretch"
                                          Margin="0,0,0.001,0" />
                        </Grid>
                        <TextBlock Style="{StaticResource ControlLabelStyle}"
                                   TextWrapping="Wrap"
                                   Text="LABEL"
                                   Margin="0,10" />
                        <Label Margin="0,3" />
                        <TextBlock Style="{StaticResource ControlLabelStyle}"
                                   TextWrapping="Wrap"
                                   Text="TABCONTROL"
                                   Margin="0,10" />
                        <TabControl Height="50"
                                    Margin="0,3">
                            <TabItem Header="TabItem">
                                <Grid />
                            </TabItem>
                            <TabItem Header="TabItem">
                                <Grid />
                            </TabItem>
                            <TabItem Header="TabItem">
                                <Grid />
                            </TabItem>
                        </TabControl>
                    </StackPanel>
                    <StackPanel Grid.Column="2"
                                Margin="20,0,10,0">
                        <TextBlock Style="{StaticResource ControlLabelStyle}"
                                   TextWrapping="Wrap"
                                   Text="DATEPICKER"
                                   Margin="0,0,0,10" />
                        <DatePicker />
                        <TextBlock Style="{StaticResource ControlLabelStyle}"
                                   TextWrapping="Wrap"
                                   Text="CALENDAR"
                                   Margin="0,25,0,10" />
                        <Calendar HorizontalAlignment="Left"
                                  FontSize="12" />
                    </StackPanel>
                </Grid>

            </StackPanel>

        </ScrollViewer>
    </Grid>

</UserControl>